package com.lwlk.zdk.util;

/**
 * @Auther: gusl
 * @Date: 2019/6/4 15:54
 * @Description:
 */
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.type.TypeFactory;
import com.fasterxml.jackson.databind.util.Converter;
import com.lwlk.zdk.controller.Task.TaskController;
import com.lwlk.zdk.model.pw.pwCheckTheDutyMessage;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
public class MyWebAppConfigurer implements WebMvcConfigurer {
        @Override
        public void addResourceHandlers(ResourceHandlerRegistry registry) {

            String os = System.getProperty("os.name");
            if (os.toLowerCase().startsWith("win")) {  //如果是Windows系统
                registry.addResourceHandler("/temp-rainy/**").addResourceLocations("file:D:/temp-rainy/");
            }else {  //linux 和mac
                registry.addResourceHandler("/temp-rainy/**")
                        .addResourceLocations("file:/usr/local/temp-rainy/");//媒体资源
            }

        }



    }


